<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
	<title>首页</title>
	<script src="https://cdn.staticfile.org/jquery/3.4.0/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
    <script>
		$(document).ready(function(){
			var token = $.cookie('token');
			$.ajax({
				    url: "/api/user/info/" + $.cookie('token'),//请求路径
				    type: "GET",//GET
				    async: false,
				    success: function(resp) {
				    	$("#email").html(resp);
				    },
				    error: function(a, b, c) {
				    	alert("token解析失败，跳转到登录页面")
				    	window.location.href = "/static/login.html";				    	
				    }
				});
		});
	</script>

</head>
<body>
<div>
	<p><span id="email"></span>,欢迎登陆系统</p>
</div>


</body>

</html>